package com.atguigu.practice;

import java.util.Scanner;

public class reverseString {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String s1=scanner.nextLine();
        StringBuilder sb=new StringBuilder();
        String[] a=s1.split(" ");
        for(int i=a.length-1;i>=0;i--){
            sb.append(a[i]);
            sb.append(" ");
        }
        System.out.println(sb.toString());
    }
}
